package com.wangjialu.learner.stream.controller.channel;

import org.springframework.cloud.stream.annotation.Input;
import org.springframework.cloud.stream.annotation.Output;
import org.springframework.messaging.MessageChannel;
import org.springframework.messaging.SubscribableChannel;

/**
 * <p>自定义消息通道</p>
 * <p>应当写在公共模块里</p>
 * @author WangJialu
 * @since 2021/6/25 2:08
 */
public interface ICustomMessageChannel {
    String INPUT = "MYINPUT";
    String OUTPUT = "MYOUTPUT";

    @Input(ICustomMessageChannel.INPUT)
    SubscribableChannel input();

    @Output(ICustomMessageChannel.OUTPUT)
    MessageChannel output();
}
